package org.batatasframework.support.searchable;

import org.batatasframework.support.database.spi.SearchExecutable;
import org.batatasframework.support.database.sql.TableRuntimeMaster;
import org.batatasframework.support.database.sql.TableInstance;
import org.batatasframework.support.database.sql.field.DefaultSelectFragment;
import org.batatasframework.support.database.sql.spi.TableCriterion;
import org.batatasframework.support.database.sql.where.QueryFragmentBuilder;

/**
 * <pre>
 * 可以被执行的一个查询处理器。
 * 这个处理器接收来自外部的对查询条件、结果、排序等进行设置。
 * </pre>
 * @author jackson
 *
 */
public interface SearchableHandler extends TableCriterion, SearchExecutable{
	
	DefaultSelectFragment[] field(String... names) throws Exception;
	
	QueryFragmentBuilder newQueryBuilder(TableInstance tableAlias, String fieldName) throws Exception;
	
	TableRuntimeMaster getMasterTableRuntime();
}
